package cn.edu.ujn.lab3.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.ujn.lab3.dao.UserMapper;
import cn.edu.ujn.lab3.po.User;
import cn.edu.ujn.lab3.service.UserService;

@Service("userService")
@Transactional
public class UserServiceImpl implements UserService {

	//注入UserDao
	private UserMapper userDao;
	// 通过账号和密码查询用户
	@Override
	public User findUser(String usercode, String password) {
		// TODO Auto-generated method stub
		User user = this.userDao.findUser(usercode, password);
		return user;
	}

	@Override
	public Integer selectUserListCount(User user) {
		// TODO Auto-generated method stub
		return this.userDao.selectUserListCount(user);
	}
}
